import http from '@/utils/http'
export const createOrder = (goods:[{skuId:string,count:number}],addressId:string)=>{
    return http({
        url:'/member/order',
        method:'post',
        data:{
            deliveryTimeType:1,
            payType:1,
            payChannel:1,
            buyerMessage:'',
            goods,
            addressId
        }
    })
}

//获取订单详情
export const getOrder = (id:string)=>{
    return http({
        url:`/member/order/${id}`,
        method:'get'
    })
}

//获取用户订单列表
/* params = {
/     orderState:0,
/     page:1,
/    pageSize:2
 }
*/

export const getUserOrder = (params : {})=>{
    return http({
        url:'/member/order',
        method:'get',
        params
    })
}